#include "admininfo.h"

#include <QDebug>

AdminInfo::AdminInfo()
{
    m_id.clear();
    m_pswd.clear();
    m_id.clear();
    m_name.clear();
    m_sex.clear();
    m_birth.clear();
    m_pswd.clear();
}

AdminInfo::AdminInfo(const QString &id,
                     const QString &name ,const QString &sex,
                                const QString &birth, const QString &pswd)
{
    m_id = id;
    m_name = name;
    m_sex = sex;
    m_birth = birth;
    m_pswd = pswd;
}

AdminInfo::~AdminInfo()
{

}

void AdminInfo::updateAdminInfo(const AdminInfo &info)
{
    m_id = info.getID();
    m_name = info.getname();
    m_sex = info.getsex();
    m_birth = info.getbirth();
     m_pswd = info.getPswd();
}

void AdminInfo::updateAdminInfo(const QString &id,
                                const QString &name ,const QString &sex,
                                           const QString &birth, const QString &pswd)
{
    m_id = id;
    m_name = name;
    m_sex = sex;
    m_birth = birth;
    m_pswd = pswd;
}

void AdminInfo::display() const
{
    qDebug() << "--------------Disp AdminInfo---------------";
    qDebug() << "ID: " << m_id;
    qDebug() << "Pswd: " << m_pswd;
    qDebug() << "name: " << m_name;
    qDebug() << "birth: " << m_birth;
    qDebug() << "sex : " << m_sex;
    qDebug() << "--------------AdminInfo End----------------";
}

void AdminInfo::setID(const QString &id)
{
    m_id = id;
}

const QString &AdminInfo::getID() const
{
    return m_id;
}
void AdminInfo::setPswd(const QString &pswd)
{
    m_pswd = pswd;
}

const QString &AdminInfo::getPswd() const
{
    return m_pswd;
}

void AdminInfo::setname(const QString &name)
{
    m_name =name;
}

const QString &AdminInfo::getname() const
{
     return   m_name;
}

void AdminInfo::setsex(const QString &sex)
{
    m_sex = sex;
}

const QString &AdminInfo::getsex() const
{
    return m_sex;
}

void AdminInfo::setbirth(const QString &birth)
{
    m_birth = birth;
}

const QString &AdminInfo::getbirth() const
{
    return m_birth;
}

